'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  //账号密码登录
  router.post('/login', controller.login.login);
  //第三方登录
  router.post('/oauth', controller.oauth.oauth);
  // 列表查询
  router.get('/getlist', controller.lists.getlist);
  //详情查询
  router.get('/getDetail', controller.getdetail.getDetail);
  //评论查询
  router.post('/getcomment', controller.getcomment.getComm)
  // 添加评论
  router.post('/addComm', controller.getcomment.addComm)
};
